﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CalendarApplication
{
    public partial class Form1 : Form
    {
        private CalendarServiceRef.User user;
        public string _name;
        public int _id;

        public Form1(Form Login, CalendarServiceRef.User User)
        {
            user = User;
            //CalendarServiceRef.CalendarServiceClient sr = new CalendarServiceRef.CalendarServiceClient();
            

            InitializeComponent();

            //grabs control initializes overall container
            ucCalendarContainer ucc = new ucCalendarContainer();
            //makes fullscreen, can change if decided
            ucc.Dock = DockStyle.Fill;
            Controls.Add(ucc);

            //this.WindowState = FormWindowState.Minimized;
            //frmLogin f = new frmLogin();
            //f.StartPosition = FormStartPosition.CenterScreen;
            //f.ShowDialog();
            //if (f.good)
            //{
            //    this.WindowState = FormWindowState.Maximized;
            //    //grabs control initializes overall container
            //    ucCalendarContainer ucc = new ucCalendarContainer();
            //    //makes fullscreen, can change if decided
            //    ucc.Dock = DockStyle.Fill;
            //    Controls.Add(ucc);
            //}
            //else
            //{
            //    Application.Exit();
            //}
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form frmLogin = new frmLogin();
            frmLogin.StartPosition = FormStartPosition.CenterScreen;
            frmLogin.Show();
        }   
    }
}
